// ==================================================================================
// Shared Genomics Project MPI Codebase
// Version 1.0 30/04/2010
//
// (c) 2010 University of Manchester all rights reserved
//
// This file is distributed under the GNU General Public License, Version 2.  
// Please see the file COPYING.txt for more details
// ==================================================================================

/*!
\file 
\brief MPI Command Fillers 
*/

#ifndef _COMMANDS_H_
#define _COMMANDS_H_

#ifdef _IS_WIN32_
#define BIN_PATH "../bin/x32/"
#endif
#ifdef _IS_WIN32_DEBUG_
#define BIN_PATH "../bin/x32/debug/"
#endif
#ifdef _IS_WIN64_
#define BIN_PATH "../bin/x64/"
#endif
#ifdef _IS_WIN64_DEBUG_
#define BIN_PATH "../bin/x64/debug/"
#endif

#define RDIR "./"
#define LDIR "./temp/"
#define NUMPROCS 2

void fill_file_listing(char *command, const char *wildcard);

void fill_binary_ped_command(char *command, const char *map, const char *ped, char *id, char *ldir, char *rdir);

void fill_pformat_data2_command(char *command, int numprocs, const char *bmap, 
								const char *bped, const char *phe, const char *phenoName,
								int available_procs, const char *run_id, const char *ldir, const char *rdir,
								const char *row_major, int nperm, int mode, double mind, double geno, double maf,
								const char *person_missingness, const char *founders, double hwe);

void fill_passoc_bt_ft_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *sped,
							   const char *ldir, const char *rdir,
							   const char *perm, int mode);

void fill_passoc_qt_ft_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *sped,
							   const char *ldir, const char *rdir,
							   const char *perm, int mode);

void fill_pmodel_ft_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *sped,
							   const char *ldir, const char *rdir,
							   const char *perm, int mode);

void fill_fast_pepi_bt_v2_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *sped,
							   const char *ldir, const char *rdir,
							   int nperm, int mode);

void fill_solcol_command(char *command, int numprocs, const char *run_id, 
			const char *covar, const char *covarColName,
			const char *ldir, const char *rdir,
			int nperm);

void fill_pcmh_ft_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *sped,
							   const char *ldir, const char *rdir,
							   const char *perm, int mode, const char *sol, double ci);

void fill_pepi_bt_v2_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *iped,
							   const char *ldir, const char *rdir,
							   int nperm, int mode);

void fill_pepi_qt_v2_command(char *command, int numprocs, const char *run_id, const char *samples,
							   const char *bmap, const char *iped,
							   const char *ldir, const char *rdir,
							   int nperm, int mode);

void fill_format_data_command(char *command, int numprocs, const char *bmap, 
								const char *bped, const char *phe, const char *phenoName,
								int available_procs, const char *run_id, const char *ldir, const char *rdir,
								const char *row_major, int nperm, int mode, double mind, double geno, double maf,
								const char *person_missingness, const char *founders, double hwe);

#endif // _COMMANDS_H_